//
//  AdvancedCollectionViewCell.m
//  Shine
//
//  Created by 俞青武 on 16/3/11.
//  Copyright © 2016年 王斌. All rights reserved.
//

#import "AdvancedCollectionViewCell.h"
#import "MASViewConstraint.h"


@implementation AdvancedCollectionViewCell

- (id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView
{
    self.backgroundColor = COLORBLACK;
    self.button = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.button setBackgroundImage:[UIImage imageNamed:@"top_horiz@3x"]forState:UIControlStateNormal];
    [self addSubview:self.button];
    
    self.label = [[UILabel alloc]init];
    self.label.textColor = COLORYELLO;
    self.label.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.label];
    
    
    [self.button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self.contentView).with.offset(0);
        make.centerY.equalTo(self.contentView).with.offset(-60);
//        make.centerY.equalTo(self.mas_centerY).width.offset(-100);
        make.size.mas_equalTo(CGSizeMake(200,150));
    }];
    
    [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.center.equalTo(self.contentView).with.offset(0);
        make.centerY.equalTo(self.button).with.offset(100);
        make.centerX.equalTo(self.button).with.offset(0);
        make.size.mas_equalTo(CGSizeMake(150, 100));
    }];
    
}


@end










